@@ -1,110 +0,0 @@
-Revision history for Perl extension MooseX-Singleton
-
-{{NEXT}}
- - This module will now work with Moose 1.9900+, but it still works with
- older Moose as well. (Dave Rolsky)
-
- - The test suite now uses Test::Fatal instead of Test::Exception. (Karen
- Etheridge)
-
-0.25 2010-08-22
- - Fixes for latest Moose. (Dave Rolsky)
-
-0.24 2010-07-15
- - Require Moose 0.94+. (Dave Rolsky)
-
-0.23 2010-07-15
- - Use modern Moose APIs to avoid warnings from the next Moose. (Dave
- Rolsky)
-
-0.22 2009-12-25
- - The ->initialize method was both broken and undocumented. RT
- #51260. (Dave Rolsky)
- - Updated docs to encourage use of ->instance and ->initialize, and
- discourage calling ->new directly. Doing so may be deprecated in a
- future release. (Dave Rolsky)
-
-0.21 2009-09-12
- - Various modules in this class were trying to load the old pre-0.20
- classes, which have all been renamed. Tests passed if you had 0.19 or
- earlier installed, but failed for fresh installations. (Dave Rolsky)
-
-0.20 2009-09-11
- - Converted this extension to use roles rather than metaclass
- subclasses. This means it will cooperate with other extensions on CPAN,
- like MooseX::StrictConstructor, etc. (Dave Rolsky)
-
-0.19 2009-07-09
- - Remove ambiguity about copyright holder (Sartak)
-
-0.18 2009-06-21
- - Changes to work Moose 0.82 (Dave Rolsky)
-
-0.17 2009-04-24
- - Add ClassName->_clear_instance. (hdp)
-
-0.16 2009-04-24
- - Changes to keep constructor inlining working with latest Moose &
- Class::MOP. This module will still work with any Moose from 0.74
- on up.
-
-0.15 2009-04-07
- - Fixed to work with Moose 0.73_01
-
- - When an object was implicitly constructed by calling
- ClassName->attribute, it skipped the BUILD and BUILDARGS defined
- for a class. Report and test from Josh in RT #42690. (Dave
- Rolsky)
-
-0.14 2009-01-22
- - Converted to use new method generation helpers in the most
- recent Moose (0.65) and Class::MOP (Dave Rolsky)
-
-0.13 2008-12-08
- - Fixed to work with Moose 0.63
-
-0.12 2008-09-20
- - Fixed to work with Moose 0.58
-
-0.11 2008-09-05
- - Fixed to work with Moose 0.57. Fixes RT #39013. Reported by Jon Swartz (Dave Rolsky)
-
-0.10 2008-09-01
- - No code changes, just a stable release to go with Moose 0.56 release (Dave Rolsky)
-
-0.09_02 2008-08-22
- - bumped the Moose dependency to 0.55_01 (Dave Rolsky)
-
-0.09_01 2008-08-21
- - fixes to work with the latest dev release of Moose - 0.55_01 (Dave Rolsky)
-
-0.09 2008-06-27
- - fix immutability to work with Moose 0.51 (Dave Rolsky)
-
-0.08 2008-05-24
- - fix make_immutable keyword in test (Sartak)
- - immutable singleton objects did not call triggers in the constructor (Dave Rolsky)
- - fix immutability to actually work with modern Moose 0.41+ (Dave Rolsky)
-
-0.07 2008-03-07
- - bump Moose dep to 0.37 because that's when we got make_immutable (Sartak)
-
-0.06 2008-03-05
- - singleton objects were broken when made_immutable (Dave Rolsky)
-
-0.05 2008-02-03
- - avoid re-BUILD-ing existing singleton objects (rjbs)
-
-0.04 2008-01-27
- - exception when ->new called with args and instance already init'd (rjbs)
- - added ->initialize method to remove any ambiguity with ->new (rjbs)
-
-0.03 2007-12-16
- - reimplementation as a metaclass (Sartak)
- - initial CPAN release
-
-0.02 2007-12-16
- - instance and new are really the same, cleanup (Sartak)
-
-0.01 2007-04-20
- - initial implementation as a role (Debolaz)
@@ -0,0 +1,120 @@
+Revision history for Perl extension MooseX-Singleton
+
+0.27 2011-12-04
+ - Fix RT Bug #46086, "name used only once" (Thanks chisel for the patch and
+ the test)
+
+0.27 2011-05-19
+
+ - Fix 006-cooperative.t - this test requires MooseX::StrictConstructor
+ 0.16+ to pass with Moose 2.00+. Reported by Alexandr Ciornii. RT
+ #67965. (Dave Rolsky)
+
+0.26 2011-02-26
+ - This module will now work with Moose 1.9900+, but it still works with
+ older Moose as well. (Dave Rolsky)
+
+ - The test suite now uses Test::Fatal instead of Test::Exception. (Karen
+ Etheridge)
+
+0.25 2010-08-22
+ - Fixes for latest Moose. (Dave Rolsky)
+
+0.24 2010-07-15
+ - Require Moose 0.94+. (Dave Rolsky)
+
+0.23 2010-07-15
+ - Use modern Moose APIs to avoid warnings from the next Moose. (Dave
+ Rolsky)
+
+0.22 2009-12-25
+ - The ->initialize method was both broken and undocumented. RT
+ #51260. (Dave Rolsky)
+ - Updated docs to encourage use of ->instance and ->initialize, and
+ discourage calling ->new directly. Doing so may be deprecated in a
+ future release. (Dave Rolsky)
+
+0.21 2009-09-12
+ - Various modules in this class were trying to load the old pre-0.20
+ classes, which have all been renamed. Tests passed if you had 0.19 or
+ earlier installed, but failed for fresh installations. (Dave Rolsky)
+
+0.20 2009-09-11
+ - Converted this extension to use roles rather than metaclass
+ subclasses. This means it will cooperate with other extensions on CPAN,
+ like MooseX::StrictConstructor, etc. (Dave Rolsky)
+
+0.19 2009-07-09
+ - Remove ambiguity about copyright holder (Sartak)
+
+0.18 2009-06-21
+ - Changes to work Moose 0.82 (Dave Rolsky)
+
+0.17 2009-04-24
+ - Add ClassName->_clear_instance. (hdp)
+
+0.16 2009-04-24
+ - Changes to keep constructor inlining working with latest Moose &
+ Class::MOP. This module will still work with any Moose from 0.74
+ on up.
+
+0.15 2009-04-07
+ - Fixed to work with Moose 0.73_01
+
+ - When an object was implicitly constructed by calling
+ ClassName->attribute, it skipped the BUILD and BUILDARGS defined
+ for a class. Report and test from Josh in RT #42690. (Dave
+ Rolsky)
+
+0.14 2009-01-22
+ - Converted to use new method generation helpers in the most
+ recent Moose (0.65) and Class::MOP (Dave Rolsky)
+
+0.13 2008-12-08
+ - Fixed to work with Moose 0.63
+
+0.12 2008-09-20
+ - Fixed to work with Moose 0.58
+
+0.11 2008-09-05
+ - Fixed to work with Moose 0.57. Fixes RT #39013. Reported by Jon Swartz (Dave Rolsky)
+
+0.10 2008-09-01
+ - No code changes, just a stable release to go with Moose 0.56 release (Dave Rolsky)
+
+0.09_02 2008-08-22
+ - bumped the Moose dependency to 0.55_01 (Dave Rolsky)
+
+0.09_01 2008-08-21
+ - fixes to work with the latest dev release of Moose - 0.55_01 (Dave Rolsky)
+
+0.09 2008-06-27
+ - fix immutability to work with Moose 0.51 (Dave Rolsky)
+
+0.08 2008-05-24
+ - fix make_immutable keyword in test (Sartak)
+ - immutable singleton objects did not call triggers in the constructor (Dave Rolsky)
+ - fix immutability to actually work with modern Moose 0.41+ (Dave Rolsky)
+
+0.07 2008-03-07
+ - bump Moose dep to 0.37 because that's when we got make_immutable (Sartak)
+
+0.06 2008-03-05
+ - singleton objects were broken when made_immutable (Dave Rolsky)
+
+0.05 2008-02-03
+ - avoid re-BUILD-ing existing singleton objects (rjbs)
+
+0.04 2008-01-27
+ - exception when ->new called with args and instance already init'd (rjbs)
+ - added ->initialize method to remove any ambiguity with ->new (rjbs)
+
+0.03 2007-12-16
+ - reimplementation as a metaclass (Sartak)
+ - initial CPAN release
+
+0.02 2007-12-16
+ - instance and new are really the same, cleanup (Sartak)
+
+0.01 2007-04-20
+ - initial implementation as a role (Debolaz)
@@ -1,4 +1,4 @@
-This software is copyright (c) 2001 by Shawn M Moore.
+This software is copyright (c) 2011 by Shawn M Moore.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
@@ -12,7 +12,7 @@ b) the "Artistic License"
--- The GNU General Public License, Version 1, February 1989 ---
-This software is Copyright (c) 2001 by Shawn M Moore.
+This software is Copyright (c) 2011 by Shawn M Moore.
This is free software, licensed under:
@@ -270,7 +270,7 @@ That's all there is to it!
--- The Artistic License 1.0 ---
-This software is Copyright (c) 2001 by Shawn M Moore.
+This software is Copyright (c) 2011 by Shawn M Moore.
This is free software, licensed under:
@@ -1,4 +1,4 @@
-ChangeLog
+Changes
LICENSE
MANIFEST
META.json
@@ -22,3 +22,4 @@ t/release-no-tabs.t
t/release-pod-coverage.t
t/release-pod-spell.t
t/release-pod-syntax.t
+t/warnings_once.t
@@ -4,7 +4,7 @@
"Shawn M Moore <sartak@gmail.com>"
],
"dynamic_config" : 0,
- "generated_by" : "Dist::Zilla version 4.200004, CPAN::Meta::Converter version 2.110240",
+ "generated_by" : "Dist::Zilla version 4.300003, CPAN::Meta::Converter version 2.112150",
"license" : [
"perl_5"
],
@@ -24,7 +24,7 @@
},
"configure" : {
"requires" : {
- "ExtUtils::MakeMaker" : "6.31"
+ "ExtUtils::MakeMaker" : "6.30"
}
},
"runtime" : {
@@ -46,7 +46,7 @@
"web" : "http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo/MooseX-Singleton.git;a=summary"
}
},
- "version" : "0.26",
+ "version" : "0.27",
"x_authority" : "cpan:SARTAK"
}
@@ -8,9 +8,9 @@ build_requires:
Test::More: 0.88
Test::Requires: 0
configure_requires:
- ExtUtils::MakeMaker: 6.31
+ ExtUtils::MakeMaker: 6.30
dynamic_config: 0
-generated_by: 'Dist::Zilla version 4.200004, CPAN::Meta::Converter version 2.110240'
+generated_by: 'Dist::Zilla version 4.300003, CPAN::Meta::Converter version 2.112150'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -22,5 +22,5 @@ requires:
resources:
bugtracker: http://rt.cpan.org/NoAuth/Bugs.html?Dist=MooseX-Singleton
repository: git://git.moose.perl.org/MooseX-Singleton.git
-version: 0.26
+version: 0.27
x_authority: cpan:SARTAK
@@ -4,33 +4,33 @@ use warnings;
-use ExtUtils::MakeMaker 6.31;
+use ExtUtils::MakeMaker 6.30;
my %WriteMakefileArgs = (
- 'ABSTRACT' => 'turn your Moose class into a singleton',
- 'AUTHOR' => 'Shawn M Moore <sartak@gmail.com>',
- 'BUILD_REQUIRES' => {
- 'ExtUtils::MakeMaker' => '6.42',
- 'Test::Fatal' => '0',
- 'Test::More' => '0.88',
- 'Test::Requires' => '0'
+ "ABSTRACT" => "turn your Moose class into a singleton",
+ "AUTHOR" => "Shawn M Moore <sartak\@gmail.com>",
+ "BUILD_REQUIRES" => {
+ "ExtUtils::MakeMaker" => "6.42",
+ "Test::Fatal" => 0,
+ "Test::More" => "0.88",
+ "Test::Requires" => 0
},
- 'CONFIGURE_REQUIRES' => {
- 'ExtUtils::MakeMaker' => '6.31'
+ "CONFIGURE_REQUIRES" => {
+ "ExtUtils::MakeMaker" => "6.30"
},
- 'DISTNAME' => 'MooseX-Singleton',
- 'EXE_FILES' => [],
- 'LICENSE' => 'perl',
- 'NAME' => 'MooseX::Singleton',
- 'PREREQ_PM' => {
- 'Moose' => '1.10',
- 'Scalar::Util' => '0'
+ "DISTNAME" => "MooseX-Singleton",
+ "EXE_FILES" => [],
+ "LICENSE" => "perl",
+ "NAME" => "MooseX::Singleton",
+ "PREREQ_PM" => {
+ "Moose" => "1.10",
+ "Scalar::Util" => 0
},
- 'VERSION' => '0.26',
- 'test' => {
- 'TESTS' => 't/*.t'
+ "VERSION" => "0.27",
+ "test" => {
+ "TESTS" => "t/*.t"
}
);
@@ -1,11 +1,11 @@
This archive contains the distribution MooseX-Singleton,
-version 0.26:
+version 0.27:
turn your Moose class into a singleton
-This software is copyright (c) 2001 by Shawn M Moore.
+This software is copyright (c) 2011 by Shawn M Moore.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
@@ -2,9 +2,8 @@ name = MooseX-Singleton
author = Shawn M Moore <sartak@gmail.com>
license = Perl_5
copyright_holder = Shawn M Moore
-copyright_year = 2001
-version = 0.26
+version = 0.27
[GatherDir]
[PruneCruft]
@@ -25,7 +24,7 @@ version = 0.26
[UploadToCPAN]
[NextRelease]
-format = %v %{ccc, MMM dd, yyyy}d
+format = %v %{yyyy-MM-dd}d
[PkgVersion]
@@ -2,8 +2,8 @@ package MooseX::Singleton::Role::Meta::Class;
BEGIN {
$MooseX::Singleton::Role::Meta::Class::AUTHORITY = 'cpan:SARTAK';
}
-BEGIN {
- $MooseX::Singleton::Role::Meta::Class::VERSION = '0.26';
+{
+ $MooseX::Singleton::Role::Meta::Class::VERSION = '0.27';
}
use Moose::Role;
use MooseX::Singleton::Role::Meta::Instance;
@@ -40,6 +40,7 @@ override _construct_instance => sub {
my $pkg = $class->name;
no strict 'refs';
+ no warnings 'once';
return ${"$pkg\::singleton"} = super;
};
@@ -80,7 +81,7 @@ MooseX::Singleton::Role::Meta::Class - Metaclass role for MooseX::Singleton
=head1 VERSION
-version 0.26
+version 0.27
=head1 DESCRIPTION
@@ -94,7 +95,7 @@ Shawn M Moore <sartak@gmail.com>
=head1 COPYRIGHT AND LICENSE
-This software is copyright (c) 2001 by Shawn M Moore.
+This software is copyright (c) 2011 by Shawn M Moore.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
@@ -2,8 +2,8 @@ package MooseX::Singleton::Role::Meta::Instance;
BEGIN {
$MooseX::Singleton::Role::Meta::Instance::AUTHORITY = 'cpan:SARTAK';
}
-BEGIN {
- $MooseX::Singleton::Role::Meta::Instance::VERSION = '0.26';
+{
+ $MooseX::Singleton::Role::Meta::Instance::VERSION = '0.27';
}
use Moose::Role;
use Scalar::Util 'weaken';
@@ -79,7 +79,7 @@ MooseX::Singleton::Role::Meta::Instance - Instance metaclass role for MooseX::Si
=head1 VERSION
-version 0.26
+version 0.27
=head1 DESCRIPTION
@@ -92,7 +92,7 @@ Shawn M Moore <sartak@gmail.com>
=head1 COPYRIGHT AND LICENSE
-This software is copyright (c) 2001 by Shawn M Moore.
+This software is copyright (c) 2011 by Shawn M Moore.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
@@ -2,8 +2,8 @@ package MooseX::Singleton::Role::Meta::Method::Constructor;
BEGIN {
$MooseX::Singleton::Role::Meta::Method::Constructor::AUTHORITY = 'cpan:SARTAK';
}
-BEGIN {
- $MooseX::Singleton::Role::Meta::Method::Constructor::VERSION = '0.26';
+{
+ $MooseX::Singleton::Role::Meta::Method::Constructor::VERSION = '0.27';
}
use Moose::Role;
@@ -114,7 +114,7 @@ MooseX::Singleton::Role::Meta::Method::Constructor - Constructor method role for
=head1 VERSION
-version 0.26
+version 0.27
=head1 DESCRIPTION
@@ -127,7 +127,7 @@ Shawn M Moore <sartak@gmail.com>
=head1 COPYRIGHT AND LICENSE
-This software is copyright (c) 2001 by Shawn M Moore.
+This software is copyright (c) 2011 by Shawn M Moore.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
@@ -2,8 +2,8 @@ package MooseX::Singleton::Role::Object;
BEGIN {
$MooseX::Singleton::Role::Object::AUTHORITY = 'cpan:SARTAK';
}
-BEGIN {
- $MooseX::Singleton::Role::Object::VERSION = '0.26';
+{
+ $MooseX::Singleton::Role::Object::VERSION = '0.27';
}
use Moose::Role;
use Carp qw( carp );
@@ -54,7 +54,7 @@ MooseX::Singleton::Role::Object - Object class role for MooseX::Singleton
=head1 VERSION
-version 0.26
+version 0.27
=head1 DESCRIPTION
@@ -66,7 +66,7 @@ Shawn M Moore <sartak@gmail.com>
=head1 COPYRIGHT AND LICENSE
-This software is copyright (c) 2001 by Shawn M Moore.
+This software is copyright (c) 2011 by Shawn M Moore.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
@@ -2,8 +2,8 @@ package MooseX::Singleton;
BEGIN {
$MooseX::Singleton::AUTHORITY = 'cpan:SARTAK';
}
-BEGIN {
- $MooseX::Singleton::VERSION = '0.26';
+{
+ $MooseX::Singleton::VERSION = '0.27';
}
use Moose 1.10 ();
@@ -58,7 +58,7 @@ MooseX::Singleton - turn your Moose class into a singleton
=head1 VERSION
-version 0.26
+version 0.27
=head1 SYNOPSIS
@@ -136,7 +136,7 @@ Shawn M Moore <sartak@gmail.com>
=head1 COPYRIGHT AND LICENSE
-This software is copyright (c) 2001 by Shawn M Moore.
+This software is copyright (c) 2011 by Shawn M Moore.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
@@ -4,7 +4,7 @@ use warnings;
use Test::More;
use Test::Requires {
- 'MooseX::StrictConstructor' => 0.09,
+ 'MooseX::StrictConstructor' => 0.16,
'Test::Fatal' => 0.001,
};
@@ -0,0 +1,14 @@
+# test script for: https://rt.cpan.org/Ticket/Display.html?id=46086
+use Test::More qw(no_plan);
+use Test::NoWarnings;
+
+BEGIN {
+ package OnlyUsedOnce;
+ use strict;
+ use warnings;
+ use MooseX::Singleton;
+}
+
+BEGIN { OnlyUsedOnce->initialize; }
+
+my $s = OnlyUsedOnce->instance;